package clonedSheep;

/**
 * @Author Big_white
 * @Date 2021/10/31
 */
public class shallowClient {
    public static void main(String[] args) {

        System.out.println("原型模式完成对象的创建");
        Sheep sheep=new Sheep("tom",1,"白色");
        Sheep sheep2=(Sheep)sheep.clone();
        Sheep sheep3=(Sheep)sheep.clone();
        Sheep sheep4=(Sheep)sheep.clone();

        System.out.println("sheep2="+sheep2);//克隆
        System.out.println("sheep3="+sheep3);//克隆
        System.out.println("sheep4="+sheep4);//克隆

    }
}
